package com.sp.system.user.customer.controller;

import com.sp.system.user.core.entity.Menu;
import com.sp.system.user.core.utils.ContentResult;
import com.sp.system.user.customer.service.IMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Describle 菜单信息
 * @author chenganhai
 * @date 2019年10月23日
 */
@Slf4j
@RequestMapping("/menu")
@RestController
public class MenuController {

    @Autowired
    IMenuService menuService;

    /**
     * 根据登录名 获取登录信息
     * @param
     * @return
     */
    @RequestMapping("/queryMenuList")
    public Object queryMenuList(@RequestBody Menu menuQuery) {
        List<Menu> menuList = menuService.queryMenuList(menuQuery);

        return ContentResult.successResult(menuList,"菜单查询");
    }
}
